package com.foundryx.shared.exception.i18n;

import java.util.Locale;

/**
 * @className: LocaleContext
 * @author: ocxz1
 * @date: 2025/6/20 下午2:02
 * @Version: 1.0
 * @description: fx-share-resources
 */
public class LocaleContext implements LocaleHold {
    private static final ThreadLocal <Locale> context = new ThreadLocal<>();

    @Override
    public void setLocale(Locale locale) {
        context.set(locale);
    }

    @Override
    public Locale getLocale() {
        return context.get();
    }
}
